package com.springboot.demo.entity;

import com.springboot.demo.entity.validate.user.IdGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author wubc683
 * @desc 菜单及url路径
 * @date 2021-08-16 8:45
 */
@Data
@NoArgsConstructor
@Api
public class Menu implements Serializable {
    @ApiModelProperty(value = "菜单id",required = true)
    private Long id;
    @ApiModelProperty(value = "菜单对应的url",required = true)
    private String url;
    @ApiModelProperty(value = "菜单url访问的方法(兼容restful风格）",required = true)
    private String method;
    @ApiModelProperty("菜单名")
    private String name;
    @ApiModelProperty("菜单组id，多个url可能对应相同的菜单组，例如：设备添加，修改，删除url对应一个组【添加/修改/删除设备】")
    private Long groupId;
    @ApiModelProperty(value = "访问菜单需要的角色",hidden = true)
    List<Role> roles;
//    List<Role> roles;
//    @ApiModelProperty(value = "子菜单",hidden = true)
//    List<Menu> childMenus;
}
